﻿/**
 * @file link_util_api.h
 * @date 2021/07/15 10:07
 * 
 * @author harrybao (harrybao@123u.com)
 * 
 * @brief SDKFramework API
 * 
 * @version v1.0.0
 * 
 * @copyright Copyright © 2021 All Rights Reserved 上海欢乐互娱网络科技有限公司
 * 
 * @par history:
 * <table>
 * <tr><th>Date                     <th>Version     <th>Author      <th>Description
 * <tr><td>2021/07/15 10:07         <td>1.0.0       <td>harrybao    <td>创建初始版本
 * </table>
 */

#pragma once

#ifdef LINK_UTIL_EXPORT
#ifdef _WIN32
#define LINK_UTIL_API __declspec( dllexport )
#else
#define LINK_UTIL_API
#endif // _WIN32
#else
#ifdef _WIN32
#define LINK_UTIL_API __declspec( dllimport )
#else
#define LINK_UTIL_API
#endif // _WIN32
#endif // LINK_UTIL_EXPORT

namespace link_util {

class PlatformLink;

/// 创建PlatformLink函数类型
using create_platform_link_func_type = PlatformLink*(*)();
/// 销毁PlatformLink函数类型
using destroy_platform_link_func_type = void(*)(PlatformLink*);

/// 创建Platform函数名
constexpr char CREATE_PLATFORM_LINK_FUNC_NAME[] = "CreatePlatformLink";
/// 销毁PlatformLink函数名
constexpr char DESTROY_PLATFORM_LINK_FUNC_NAME[] = "DestroyPlatformLink";
}

/**
 * @brief 创建PlatformLink
 * 
 */
extern "C" LINK_UTIL_API link_util::PlatformLink* CreatePlatformLink();

/**
 * @brief 销毁PlatformLink
 * 
 */
extern "C" LINK_UTIL_API void DestroyPlatformLink(link_util::PlatformLink* platform_link_ptr);
